package com.ccrfid.rmc6.service.sys;

import com.ccrfid.rmc6.appconfig.exception.pojo.AppException;
import com.ccrfid.rmc6.entity.sys.AccountEntity;
import com.ccrfid.rmc6.entity.sys.AccountView;
import com.ccrfid.rmc6.entity.sys.RoleEntity;
import com.ccrfid.rmc6.pojo.dto.sys.AccountDto;
import com.ccrfid.rmc6.repository.search.SearchCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface AccountService {
    //
    Page<AccountView> getAccountInfoPage(SearchCriteria criteria, Pageable pageable);
    //
    AccountDto getAccountInfo(Long accountId);
    //
    AccountEntity getAccountInfo(String userAccount);
    //
    AccountEntity createAccount(AccountEntity entity) throws AppException;
    //
    AccountEntity updateAccount(Long accountId, AccountEntity entity) throws AppException;
    //
    Boolean resetAccountPassword(Long accountId, String password) throws AppException;
    //
    List<RoleEntity> getRoleList(Long accountId);
    //
    List<RoleEntity> updateRoleList(Long accountId, List<Long> roleIdList) throws AppException;
    //
    int deleteAccounts(List<Long> idList);
    //
    List<AccountEntity> getAccountListByPersonnelId(Long personnelId);
}
